package cn.com.duiba.millionaire.center.biz.dao;

import cn.com.duiba.millionaire.center.biz.entity.MillionaireQuestionEntity;

import java.util.List;

/**
 * Created by sty on 1/18/18.
 */
public interface MillionaireQuestionDao {
    /**
     * 插入
     * @param millionaireQuestionEntity
     * @return
     */
    MillionaireQuestionEntity insert(MillionaireQuestionEntity millionaireQuestionEntity);


    /**
     * 更新
     * @param millionaireQuestionEntity
     * @return
     */
    int updateById(MillionaireQuestionEntity millionaireQuestionEntity);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    MillionaireQuestionEntity findById(Long id);

    /**
     * 根据id批量查询
     * @param ids
     * @return
     */
    List<MillionaireQuestionEntity> findByIds(List<Long> ids);

    /**
     * 根据id删除
     * @param id
     * @return
     */
    int deleteById(Long id);


    /**
     * 根据bag_id批量查询
     * @param questionBagId
     * @return
     */
    List<MillionaireQuestionEntity> findByBagId(Long questionBagId);

}
